home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NBC Slam Jams!
/
NBC Slam Jams!.iso
/
xtras
/
media_la
/
fx_set_2.fxm
/
00282_Script_Memory Script
< prev
next >
Wrap
Text File
|
1998-07-02
|
1KB
|
46 lines
on mouseDown
put the clickLoc into cLoc
put the clickOn into c
put the locH of cLoc - the locH of sprite c into h
put the locV of cLoc - the locV of sprite c into v
if h > 21 then exit -- need to click on either set or get
if v > 13 then -- get
set action = "get"
else
set action = "set"
end if
repeat while the stillDown
put the mouseH - the locH of sprite c into h
put the mouseV - the locV of sprite c into v
put ((h-21)/18+1)+(v/13)*4 into n
if h < 21 or v < 0 or v > 26 or n < 1 or n > 8 then
set the member of sprite c = member ("memory"&&action)
else
set the member of sprite c = member ("memory"&&action&&n)
end if
updateStage
end repeat
if h < 21 or v < 0 or v > 26 or n < 1 or n > 8 then exit -- not valid
global fxTrackingObj, version
if not objectP(fxTrackingObj) then exit
if value(char 1 to 3 of version) < 6 then
alert "Memory buttons require Director 6 or later."
exit
end if
if action = "set" then
setMemory(fxTrackingObj,n)
else if action = "get" then
getMemory(fxTrackingObj,n)
end if
set the member of sprite c = member ("memory")
puppetSprite c, FALSE
end